<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/views/common/includetag.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="en_US">
	<head>
		<title><spring:message code="app.courseTemplate.area.property.edit.title" /></title>
        <link rel="stylesheet" type="text/css" href="${ctx}/static/css/manage/manage.jcrop.css">
        <style type="text/css">
        	body{
        	    background-color: #FFF !important;
    			background-size: cover;
    			background-image: none;
			}
        	.topbar {
			    margin: 0 !important;
			    padding: 0 !impupload.jsportant;
			    min-height: 36px !important;
			    border: none !important;
			    display: none;
			}
			.main-container {
			    margin-top: 0px !important;
			    margin-left: 0px;
			    position: relative;
			}
			#pageslide-left {
			    width: 210px;
			    z-index: 1021;
			    position: fixed;
			    top: 0;
			    left: 0;
			    padding-top: 60px;
			    display: none !important;
			}
			.container {
			    padding-right: 0;
			    padding-left: 0;
			    margin-right: auto;
			    margin-left: auto;
			}
			.form-group {
			    position: relative;
			    display: flex;
			}
			.col-sm-2{
				width : 20%;
				text-align : right;
			}
			.col-sm-3{
				width : 30%;
			}
			.col-sm-6{
				width : 60%;
				text-align:right
			}
			.col-sm-7{
				width : 70%;
			}
			.col-sm-8{
				width : 80%;
			}
			.button-group {
			    position: fixed !important;
			}
			.row_addtmxx{
				margin: 10px;
			}
			.table.table-bordered thead tr th {
			    vertical-align: middle;
			    text-align: center;
			}
        </style>
        <script type="text/javascript">
			var courseTemplateId = '${courseTemplateId}';
			var width_bl = '${width_bl}';
			var posId = '${posId}';
			var sfsf = '${sfsf}';
			var type = '${type}';
			var px1 = '${px1}';
			var px2 = '${px2}';
			var py1 = '${py1}';
			var py2 = '${py2}';
		</script>
        <script type="text/javascript" src="${ctx}/static/js/manage/courseTemplate/edit_prop.js"></script>
	</head>
	<body>
		<div class="row">
			<div class="col-md-12">
				<section class="panel paddingtop20">
                    <div class="panel-body">
                    	<form id="cropPictureForm" role="form" class="data-form form-horizontal" method="POST" >
                    		<div class="form-group">
                                <label class="col-sm-2 control-label">
                                	<spring:message code="app.courseTemplate.area.title.areaTitle" />
                                	<span class="requiredClass">*</span>
                                </label>
                                <div class="col-sm-8">
                                    <input id="qymcid" name="areaTitle" value="${entity.areaTitle}" maxlength="50" style="width:400px" 
                                    	class="form-control required input_check"
                                    	placeholder="<spring:message code="app.courseTemplate.area.placeholder.areaTitle" />" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">
                                	<spring:message code="app.courseTemplate.area.title.lx" />
                                </label>
                                <div class="col-sm-8">
                                    <c:choose>
										<c:when test="${empty entity.id}">
											<select id="lxid" name="lx" value="${entity.lx}" onchange="changeEvent(this.value)" style="width:400px;">
												<option value="0" <c:if test="${entity.lx=='0'}">selected</c:if> >特征点</option>
												<option value="2" <c:if test="${entity.lx=='2'}">selected</c:if> >考号填涂-采集</option>
												<option value="1" <c:if test="${entity.lx=='1'}">selected</c:if> >考生编号</option>
												<option value="6" <c:if test="${entity.lx=='6'}">selected</c:if> >客观题填涂-采集</option>
												<option value="3" <c:if test="${entity.lx=='3'}">selected</c:if> >客观题（单选）</option>
												<option value="4" <c:if test="${entity.lx=='4'}">selected</c:if> >客观题（多选）</option>
												<option value="5" <c:if test="${entity.lx=='5'}">selected</c:if> >主观题</option>
												<option value="9" <c:if test="${entity.lx=='9'}">selected</c:if> >缺考</option>
											</select>
											<span class="requiredClass">*</span>
										</c:when>
										<c:otherwise>
											<c:if test="${entity.lx=='0'}">特征点</c:if>
											<c:if test="${entity.lx=='2'}">考号填涂-采集</c:if>
											<c:if test="${entity.lx=='1'}">考生编号</c:if>
											<c:if test="${entity.lx=='6'}">客观题填涂-采集</c:if>
											<c:if test="${entity.lx=='3'}">客观题（单选）</c:if>
											<c:if test="${entity.lx=='4'}">客观题（多选）</c:if>
											<c:if test="${entity.lx=='5'}">主观题</c:if>
											<c:if test="${entity.lx=='9'}">缺考区域</c:if>
											<input type="hidden" id="lxid" name="lx" value="${entity.lx}">
										</c:otherwise>
									</c:choose>
                                </div>
                            </div>
                            <div class="row_cols form-group">
                                <label class="col-sm-2 control-label">
                                	<spring:message code="app.courseTemplate.area.title.colCount" />
                                	<span class="requiredClass">*</span>
                                </label>
                                <div class="col-sm-8">
                               		<input id="colsid" name="colCount" value="${entity.colCount}" maxlength="2" 
                               			class="form-control required input_check"
                                    	placeholder="<spring:message code="app.courseTemplate.area.placeholder.colCount" />" 
                                    	onkeyup="value=value.replace(/[^\d]/g,'')" style="width:400px" 
                                    	onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
                                </div>
                            </div>
                            <div class="row_th form-group">
                                <label class="col-sm-2 control-label">
                                	<spring:message code="app.courseTemplate.area.title.th" />
                                	<span class="requiredClass">*</span>
                                </label>
                                <div class="col-sm-8">
                               		<input id="thid" name="th" value="${entity.th}" style="width:400px" maxlength="5"
                                    	placeholder="<spring:message code="app.courseTemplate.area.placeholder.int" />" 
                                    	class="form-control required input_check"
                                    	onkeyup="value=value.replace(/[^\d]/g,'')" 
                                    	onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
                                </div>
                             </div>
                             <div class="row_th form-group">   
                                <label class="col-sm-2 control-label">
                                	<spring:message code="app.courseTemplate.area.title.zfz" />
                                	<span class="requiredClass">*</span>
                                </label>
                                <div class="col-sm-8">
                               		<input id="zfzid" name="zfz" maxlength="5" value="${entity.zfz}" style="width:400px"
                                    	placeholder="<spring:message code="app.courseTemplate.area.placeholder.fz" />" 
                                    	class="form-control required input_check" />
                                </div>
                            </div>
                            <div class="row_dtfz form-group">
                                <label class="col-sm-2 control-label">
                                	<spring:message code="app.courseTemplate.area.title.dtfz" />
                                	<span class="requiredClass">*</span>
                                </label>
                                <div class="col-sm-8">
                               		<input id="dtfzid" name="dtfz" maxlength="5" value="${entity.dtfz}" style="width:400px"
                                    	placeholder="<spring:message code="app.courseTemplate.area.placeholder.fz" />" 
                                    	class="form-control required input_check" />
                                </div>
                            </div>
                            <div class="row_dtfz form-group">
                                <label class="col-sm-2 control-label">
                                	<spring:message code="app.courseTemplate.area.title.thfw" />
                                	<span class="requiredClass">*</span>
                                </label>
                                <div class="col-sm-8" style="display: inline-flex;line-height: 30px;">
                               		<input id="ksthid" name="ksth" maxlength="3" value="${entity.ksth}" style="width:183px;margin-right:2px;" 
                                    	placeholder="<spring:message code="app.courseTemplate.area.placeholder.int" />" 
                                    	class="form-control required input_check"
                                    	onkeyup="value=value.replace(/[^\d]/g,'')" 
                                    	onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
                                    ~至~
                                    <input id="jsthid" name="jsth" maxlength="3" value="${entity.jsth}" style="width:183px;margin-left:2px;" 
                                    	placeholder="<spring:message code="app.courseTemplate.area.placeholder.int" />" 
                                    	class="form-control required input_check"
                                    	onkeyup="value=value.replace(/[^\d]/g,'')" 
                                    	onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/,''))" />
                                </div>
                            </div>
                            <div class="row_xztpllx form-group">
                                <label class="col-sm-2 control-label">
                                	<spring:message code="app.courseTemplate.area.title.xxsl" />
                                </label>
                                <div class="col-sm-8">
                               		<select name="daxxsl" value="${entity.xxsl}" style="width:400px;">
										<option value="3" <c:if test="${entity.xxsl=='3'}">selected</c:if> >3个（A、B、C）</option>
										<option value="4" <c:if test="${entity.xxsl=='4'}">selected</c:if> >4个（A、B、C、D）</option>
										<option value="5" <c:if test="${entity.xxsl=='5'}">selected</c:if> >5个（A、B、C、D、E）</option>
										<option value="6" <c:if test="${entity.xxsl=='6'}">selected</c:if> >6个（A、B、C、D、E、F）</option>
									</select>
                                </div>
                             </div>
                             <div class="row_xztpllx form-group">
                                <label class="col-sm-2 control-label">
                                	<spring:message code="app.courseTemplate.area.title.tmplfx" />
                                </label>
                                <div class="col-sm-8">
                               		<select name="tmplfx" style="width:400px;">
										<option value="0" >竖向排列</option>
										<option value="1" >横向排列</option>
									</select>
                                </div>
                            </div>
                            <div class="row_dxtlxfz form-group">
                                <label class="col-sm-2 control-label">
                                	<spring:message code="app.courseTemplate.area.title.dtfzlx" />
                                	<span class="requiredClass">*</span>
                                </label>
                                <div class="col-sm-8">
                               		<input id="dtfzlxid" name="dtfzlx" maxlength="5" value="${entity.dtfzlx}" style="width:400px"
                                    	placeholder="<spring:message code="app.courseTemplate.area.placeholder.fz" />" 
                                    	class="form-control required input_check" />
                                </div>
                            </div>
                            <div class="row_ms form-group">
                                <label class="col-sm-2 control-label"><spring:message code="app.courseTemplate.area.title.ms" /></label>
                                <div class="col-sm-8">
                                	<textarea id="msid" name="ms" style="height:80px;width:400px;" class="form-control common-textarea">${entity.ms}</textarea>
                                </div>
                            </div>
                            <div class="row_tipInfo form-group">
                            	<label class="col-sm-2 control-label"><spring:message code="app.courseTemplate.area.title.zysx" /></label>
                            	<div class="col-sm-8">
                            		<span id="tipinfo_span" style="color:red;line-height: 30px;"></span>
                            	</div>
                            </div>
                            <div class="row_addtmxx form-group">
                            	<a id="tjxxId" href="#none" class="btn btn-primary btn-add">
									<i class="fa fa-plus"></i>
									<spring:message code="app.common.action.add" />
								</a>
                            </div>
                            <div class="row_singletm form-group">
                            	<table id="tabtmxx" width="640px" class="table table-striped table-bordered table-hover table-full-width" >
							    	<thead>
								    	<tr>
								            <th width="10%"><spring:message code="app.common.title.serial" /></th>
								            <th width="15%"><spring:message code="app.courseTemplate.area.tmxx.title.xth" /><span class="requiredClass">*</span></th>
								            <th width="45%"><spring:message code="app.courseTemplate.area.tmxx.title.mc" /><span class="requiredClass">*</span></th>
								            <th width="20%"><spring:message code="app.courseTemplate.area.tmxx.title.fz" /><span class="requiredClass">*</span></th>
								            <th width="10%"><spring:message code="app.common.action.operate" /></th>
								   		</tr>
							   		</thead>
							   		<tbody>
							   			<c:if test="${not empty xtList}">
								   			<c:forEach var="xt" items="${xtList}" varStatus="status">
								   				<tr id="${xt.id}_1" align="center">
								   					<td>${status.index + 1}</td>
		                     						<td>
		                     							<input type="text" id="tmbh_${xt.id}" name="tmbh_${xt.id}" value="${xt.th}" style="width:80%;"
		                     								maxlength="3" placeholder="输入题号" class="input_check"
		                     								onkeyup="value=value.replace(/[^\d]/g,'')" />
		                     						</td>
		                     						<td>
		                     							<input type="text" id="tmmc_${xt.id}" name="tmmc_${xt.id}" value="${xt.mc}" style="width:90%;"
		                     								maxlength="20" placeholder="输入题目名称" class="input_check" />
		                     						</td>
		                     						<td>
		                     							<input type="text" id="tmfz_${xt.id}" name="tmfz_${xt.id}" value="${xt.fz}" style="width:85%;"
		                     								maxlength="5" placeholder="输入数字、小数" class="input_check" />
		                     						</td>
		                     						<td><a href="#" onclick="deltr($(this),'${xt.id}',1)"><spring:message code="app.common.action.delete" /></a></td>
								   				</tr>
								   			</c:forEach>
							   			</c:if>
							   		</tbody>
							   	</table>
                            </div>
                            <div class="form-group button-group" style="text-align: right;">
								<label class="col-sm-3 control-label"></label>
								<div class="col-sm-6">
									<button type="button" id="add_crop_info" class="btn btn-primary submit"><spring:message code="app.common.action.submit" /></button>
								</div>
							</div>
							
							<input type="hidden" name="width_bl" value="${width_bl}"/>
							<input type="hidden" id="x1" name="x1" value="${x1}"/>
							<input type="hidden" id="y1" name="y1" value="${y1}"/>
							<input type="hidden" id="x2" name="x2" value="${x2}"/>
							<input type="hidden" id="y2" name="y2" value="${y2}"/>
							<input type="hidden" id="courseTemplateId" name="courseTemplateId" value="${courseTemplateId}"/>
							<input type="hidden" id="posId" name="posId" value="${posId}"/>
							<input type="hidden" id="sfsf" name="sfsf" value="${sfsf}"/>
							<input type="hidden" id="type" name="type" value="${type}"/>
							<input type="hidden" id="rowCount" name="rowCount" value="10"/>
							<input type="hidden" id="lx_value" name="lx_value" value=""/>
							<input type="hidden" id="addIds" name="addIds" value=""/>
							<input type="hidden" id="editIds" name="editIds" value=""/>
                    	</form>
                    </div>
                </section>
            </div>
        </div>
	</body>
</html>